package aip.core.dao.user;

import java.util.List;

import org.springframework.dao.DataAccessException;

import aip.core.model.user.Contacts;

import com.googlecode.horncomb.bean.filter.ConditionSet;
import com.googlecode.horncomb.bean.filter.SimpleMapConditionSet;
import com.googlecode.horncomb.bean.order.DefaultOrder;
import com.googlecode.horncomb.bean.order.DefaultOrderToken;
import com.googlecode.horncomb.bean.order.Order;
import com.googlecode.horncomb.orm.ibatis.SqlMapEntityDaoImpl;

/**
 * Contacts data access object
 * <p>
 * 负责人/principal:<br/>
 * 修改记录/revision:<br/>
 * 日期:<br/>
 * 修改人:<br/>
 * 修改说明:<br/>
 * @author
 * @version $Id$
 */
public class ContactsDao extends SqlMapEntityDaoImpl<Contacts>
{
    private static final long serialVersionUID = -3192015758724275487L;

    public List<? extends Contacts> queryByProvince(String province)
            throws DataAccessException
    {
        ConditionSet cons = new SimpleMapConditionSet().addConstraint(
                "province", province);
        Order order = new DefaultOrder(new DefaultOrderToken("ORDER_"));
        return super.query(cons, order);
    }
}
